//
//  UIView+XFGetNavgation.m
//  SinaBlog_OC
//
//  Created by macs on 15/11/17.
//  Copyright © 2015年 BlackTail. All rights reserved.
//

#import "UIView+XFGetNavgation.h"

@implementation UIView (XFGetNavgation)

- (UINavigationController *)getNavgationController{
    
    UIResponder *next = self.nextResponder;
    
    do {
        
        if ([next isKindOfClass:[UINavigationController class]]) {
            return (UINavigationController*)next;
        }
        next = next.nextResponder;
    } while (next != nil);
    
    return nil;
}

@end
